<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/privacy/dlp/v2beta1/dlp.proto

namespace Google\Cloud\Dlp\V2beta1;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Configuration for determining how redaction of images should occur.
 *
 * Generated from protobuf message <code>google.privacy.dlp.v2beta1.RedactContentRequest.ImageRedactionConfig</code>
 */
class RedactContentRequest_ImageRedactionConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.Color redaction_color = 3;</code>
     */
    private $redaction_color = null;
    protected $target;

    public function __construct() {
        \GPBMetadata\Google\Privacy\Dlp\V2Beta1\Dlp::initOnce();
        parent::__construct();
    }

    /**
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @return \Google\Cloud\Dlp\V2beta1\InfoType
     */
    public function getInfoType()
    {
        return $this->readOneof(1);
    }

    /**
     * Only one per info_type should be provided per request. If not
     * specified, and redact_all_text is false, the DLP API will redact all
     * text that it matches against all info_types that are found, but not
     * specified in another ImageRedactionConfig.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.InfoType info_type = 1;</code>
     * @param \Google\Cloud\Dlp\V2beta1\InfoType $var
     * @return $this
     */
    public function setInfoType($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\InfoType::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * If true, all text found in the image, regardless whether it matches an
     * info_type, is redacted.
     *
     * Generated from protobuf field <code>bool redact_all_text = 2;</code>
     * @return bool
     */
    public function getRedactAllText()
    {
        return $this->readOneof(2);
    }

    /**
     * If true, all text found in the image, regardless whether it matches an
     * info_type, is redacted.
     *
     * Generated from protobuf field <code>bool redact_all_text = 2;</code>
     * @param bool $var
     * @return $this
     */
    public function setRedactAllText($var)
    {
        GPBUtil::checkBool($var);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.Color redaction_color = 3;</code>
     * @return \Google\Cloud\Dlp\V2beta1\Color
     */
    public function getRedactionColor()
    {
        return $this->redaction_color;
    }

    /**
     * The color to use when redacting content from an image. If not specified,
     * the default is black.
     *
     * Generated from protobuf field <code>.google.privacy.dlp.v2beta1.Color redaction_color = 3;</code>
     * @param \Google\Cloud\Dlp\V2beta1\Color $var
     * @return $this
     */
    public function setRedactionColor($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2beta1\Color::class);
        $this->redaction_color = $var;

        return $this;
    }

    /**
     * @return string
     */
    public function getTarget()
    {
        return $this->whichOneof("target");
    }

}

